//
//  ScanController.h
//  kismet-frontend
//
//  Created by L. Preston Sego III on 7/17/09.
//  Copyright 2009 Precognition Inc.. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import "Constants.h"
#import "KismetController.h"
#import "PrefsController.h"
#import "PluginController.h"
#import "NetworkData.h"
#import "Network.h"

@interface ScanController : NSObject {

    //General
    int                 _selectedRow;
    __availableTabs     _currentTab;            //which tab visible?
    bool                _scanning;              //are we scanning?
    bool                _refreshGUI;
    Network *_currentNetwork;
    
    // Communicating with Kismet
    KismetController *_kismetController;
    
    
    // Table Data Stuff
    NSString            *_lastSorted;           //name of the last sorted column
    bool                _ascending;             //are we sorting in ascending mode?
    NetworkData *_networkData;

    

    
    //About Window
    IBOutlet NSWindow    *_aboutWindow;
    IBOutlet NSTextField *_aboutVersion;
    
    //Main Window
    IBOutlet NSWindow      *_mainWindow;
    IBOutlet NSBox         *_mainViewHolder;
    IBOutlet NSSearchField *_searchField;
    
    //Networks View
    IBOutlet NSView       *_networksMaster;
    IBOutlet NSScrollView *_networksTableView;
    IBOutlet NSTableView  *_networksTable;
    IBOutlet NSBox        *_networksTableBay;
    
    IBOutlet NSTextField *_networksCount;
    IBOutlet NSTextField *_packetsCount;
    IBOutlet NSTextField *_packetRateCount;
    IBOutlet NSTextField *_elapsedTime;
    IBOutlet NSTextField *_numOpenNetworks;
    IBOutlet NSTextField *_numWEPNetworks;
    IBOutlet NSTextField *_numWPANetworks;
    IBOutlet NSTextField *_activeDevices;
    IBOutlet NSTextField *_currentChannel;
    
    //Network Detail View
    IBOutlet NSView *_detailsMaster;
    
    //Channel Detail View
    IBOutlet NSSplitView *_channelDetailMaster;
    IBOutlet NSTableView *_channelDetails;
    
    //Plugin Manager Window
    PluginController *_pluginController;
    
    //Preferences Window
    PrefsController *_prefsController;
    
}

//Toolbar Actions
-(void)openFile:(id)sender;
-(void)saveFile:(id)sender;
-(void)newFile:(id)sender;

-(void)showNetworksView:(id)sender;
-(void)showNetworkDetails:(id)sender;
-(void)showChannelDetails:(id)sender;
-(void)showPluginManager:(id)sender;
-(void)showAboutWindow:(id)sender;
-(void)showHelp:(id)sender;
-(void)showServerComm:(id)sender;

-(void)crackNetwork:(id)sender;
-(void)showPreferences:(id)sender;
-(void)scanToggle:(id)sender;
-(void)changeSearchValue:(id)sender;


//Channel Details View Methods
-(IBAction)switchOrientation:(id)sender;



@end
